Skip to main content
Version: Next

iOS

HumaModel is a core library that provides a set of data structures and repository interfaces for working with them.

Getting Started

We can split the models into the following categories:

Common

  • RepositoryError is used to describe failures in repository callbacks.
  • RepositoryResult represents a result of a repository callback.
  • RepositoryCompletion represents a repository callback.

User

  • The AnyUser protocol defines all needed user properties and is used in other libraries. You can use the built-in User struct or create your own implementation.
  • To work with the user models, you have to implement the following protocols: AnyUserSessionRepository, AnyUserObserveRepository, and AnyUserUpdateRepository.

Modules

  • The AnyPrimitive protocol describes a value of a module result.
  • The ModuleResult struct represents a generic result of a module.
  • To work with module results, you have to implement the following protocols: AnyModuleResultObserveRepository and AnyModuleResultSubmitRepository.

Configuration

  • The AnyConfiguration protocol describes all parameters of a configuration used in the other libraries. Some of the parameters are custom struct types; you can read the documentation in the code.
  • To work with configuration, you have to implement the following protocols: AnyConfiguration and AnyConfigurationRepository.

Storage

The FileObject struct contains the location details of a file and is used to upload or download the files.

  • To work with storage operations, you have to implement AnyFileRepository.

Analytics

  • The library includes an extension to AnyAnalytics from HumaUtils that allows you to identify analytics with the AnyUser model.

Documentation

API Reference

Dependencies